<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>西山居游戏</title>
<meta name="keywords" content="西山居,西山居游戏,西山居概念官网,剑网3,剑侠世界,招聘" /> 
<meta name="Description" content="西山居是国内老牌知名游戏公司，以游戏的方式，创造快乐，传递快乐。" />
<link rel="stylesheet" href="<%=basePath %>/css/common.css" />
<link rel="stylesheet" href="<%=basePath %>/css/code.css" />
<link rel="stylesheet" href="<%=basePath %>/css/about.css" />
</head>
<body>

	<div class="container">
		<div class="head">
		<p class="title_top"><a style="float:none" href="/">公司logo</a></p>
			<div class="nav">
				<ul class="lavaLamp">
					<li ><a href="/index/rendPage?type=index&modelId=3">产品下载</a></li>
					<!--<li><a href="news.html">企业动态</a></li>-->
					<li class="current-cat"><a href="/index/code/rendPage?page=1&rows=10">源码教学</a></li>
				</ul>
			</div>	
		</div>
	
		<div class="cont" style="">
			<div style='width:100%;height:800px;border: 1px solid #EEEEEE;'>
			<c:forEach items="${codes.rows }" var="code">
				<div class='articleTitle'>
					<img class='titleImg' src='/img/news1.gif'/><font class='titleContent'><a href='/index/code/rendContent?id=${code.id }'>${code.title }</a></font>
					<font class='titleDate'><fmt:formatDate value="${code.createDate }" pattern="yy-MM-dd"/> </font>
				</div>
			</c:forEach>	
				
				<br/>
				<!-- 分页 -->
				<c:set value="${ codes.pageNumber}" var='curPage'></c:set>
				<c:set value="${ codes.totalPage }" var='totalPage'></c:set>
				<c:set value="2" var='pageSize'></c:set>
				  <div class="digg"> 
					
						<c:choose>
       						<c:when test="${curPage == 1}">
       							<a class='disabled'   > &lt;</a>
       						</c:when>
       						<c:otherwise>
       								<a href='searchArticles?curPage=${curPage-1 }&pageSize=${pageSize}'   > &lt;</a>
       						</c:otherwise>
       					</c:choose>
					<c:forEach var="i" begin="1" end="${totalPage}" varStatus="status">
       					<c:choose>
       						<c:when test="${curPage == i }">
       							<a class="current" href='searchArticles?curPage=${i }&pageSize=${pageSize}'>${status.index }</a>
       						</c:when>
       						<c:otherwise>
       								<a href="searchArticles?curPage=${i }&pageSize=${pageSize}">${status.index }</a>
       						</c:otherwise>
       					</c:choose>
					</c:forEach>
					<c:choose>
  						<c:when test="${curPage == totalPage}">
  							<a class='disabled'   > &gt;</a>
  						</c:when>
  						<c:otherwise>
  								<a href='searchArticles?curPage=${curPage+1 }&pageSize=${pageSize}'   > &gt;</a>
  						</c:otherwise>
       				</c:choose>
				</div> 
			</div>
		</div>
	</div>
	
	<jsp:include page="footer.jsp" />
 
    
</body>
</html>
 